package com.hoshiicloud.shxping.feign.hystrix;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hoshiicloud.common.rpc.Response;
import com.hoshiicloud.shxping.dto.*;
import com.hoshiicloud.shxping.feign.IUserFeignService;
import com.hoshiicloud.shxping.param.MemberAddressPageParam;
import com.hoshiicloud.shxping.param.MemberAddressUpdateParam;
import com.hoshiicloud.shxping.param.MemberWithConsumerParam;
import com.hoshiicloud.shxping.param.PlatStoreQueryParam;
import com.hoshiicloud.user.entity.store.PlatStore;

import javax.validation.Valid;
import java.util.List;
import java.util.Map;

/**
 * @author yangcheng
 * @version 1.0
 * @title: HystrixUserFeignFallback
 * @description: 用户微服务FeignClient熔断器
 * @date 2019/7/20 15:40
 * @mail maiboyc@163.com
 */
public class HystrixUserFeignFallback  implements IUserFeignService {

    /**
     * 根据id获取租户
     * @param id ID
     * @return Response
     */
    @Override
    public Response getCompanyById(Long id) {
        return Response.failed("根据id查询租户信息失败");
    }

    /**
     * 根据租户会员ID获取租户会员信息
     * @param id 租户会员ID
     * @return Response
     */
    @Override
    public Response getMemberById(Long id) {
        return Response.failed("根据租户会员ID获取租户会员信息失败");
    }

    /**
     * 保存租户会员信息
     * @param memberDto 租户会员信息DTO
     * @return  Response
     */
    @Override
    public Response saveMember(MemberDto memberDto) {
        return Response.failed("保存租户会员信息失败");
    }

    /**
     * 更新租户会员信息
     * @param memberDto 租户会员信息DTO
     * @return  Response
     */
    @Override
    public Response updateMember(MemberDto memberDto) {
        return Response.failed("更新租户会员信息失败");
    }

    /**
     * 根据wxOpenId查询租户会员信息
     * @param wxOpenId 微信用户唯一id
     * @return Response
     */
    @Override
    public Response getMemberByWxOpenId(String wxOpenId) {
        return Response.failed("根据wxOpenId查询租户会员信息失败");
    }

    /**
     * 根据手机号码查询租户会员
     * @param mobile 手机号码
     * @return Response
     */
    @Override
    public Response<MemberDto> getMemberByMobile(Long companyId,String mobile) {
        return Response.failed("根据手机号码查询租户会员信息失败");
    }

    /**
     * 根据微信openId和手机号码获取租户会员信息
     * @param wxOpenId 微信openId
     * @param mobile 手机号码
     * @return Response<MemberDto>
     */
    @Override
    public Response<MemberDto> getMemberByWxOpenIdOrMobile(String wxOpenId, String mobile) {
        return Response.failed("根据微信openId和手机号码获取租户会员信息失败");
    }

    /**
     * 查询租户会员信息和平台会员信息
     * @param param 查询参数
     * @return Response<Map<String,Object>>
     */
    @Override
    public Response<Map<String, Object>> getMemberWithConsumerInfo(MemberWithConsumerParam param) {
        return Response.failed("没有查询到租户会员信息和平台会员信息");
    }

    /**
     * 根据参数查找租户会员信息
     * @param param 查询参数
     * @return  Response<List<MemberDto>>
     */
    @Override
    public Response<List<MemberDto>> getMembers(MemberDto param) {
        return Response.failed("没有查询到租户会员信息");
    }

    /**
     * 根据id获取平台会员
     * @param id ID
     * @return Response
     */
    @Override
    public Response<ConsumerDto> getConsumerById(Long id) {
        return null;
    }

    /**
     * 根据参数查询平台会员信息
     * @param entity 查询参数实体
     * @return Response<List<ConsumerDto>>
     */
    @Override
    public Response getConsumers(ConsumerDto entity) {
        return Response.failed("查询平台会员信息失败");
    }

    /**
     * 保存平台会员信息
     * @param entity 保存对象
     * @return Response<Long>
     */
    @Override
    public Response saveConsumer(ConsumerDto entity) {
        return Response.failed("保存平台会员信息失败");
    }

    /**
     * 更新平台会员信息
     * @param entity 更新对象
     * @return Response<Long>
     */
    @Override
    public Response<Long> updateConsumer(ConsumerDto entity) {
        return Response.failed("更新平台会员信息失败");
    }

    /**
     * 保存平台会员账户
     * @param entity 保存对象
     * @return Response<Long>
     */
    @Override
    public Response saveMemberAccount(MemberAccountDto entity) {
        return Response.failed("保存会员账户信息失败");
    }

    /**
     * 保存会员收货地址
     * @param entity 会员收货地址实体
     * @return Response<Long>
     */
    @Override
    public Response<Long> addAddress(MemberAddressDto entity) {
        return null;
    }

    /**
     * 修改会员收货地址
     * @param entity 会员收货地址修改参数实体
     * @return Response<Long>
     */
    @Override
    public Response<Long> updateAddress(MemberAddressUpdateParam entity) {
        return null;
    }

    /**
     * 删除会员收货地址
     * @param id 收货地址ID
     * @return Response<Long>
     */
    @Override
    public Response<Long> deleteAddress(Long id) {
        return null;
    }

    /**
     * 查看会员收货地址
     * @param entity 查询参数实体
     * @return Response<Page<MemberAddressDto>>
     */
    @Override
    public Response<Page<MemberAddressDto>> viewAddress(MemberAddressPageParam entity) {
        return Response.failed("分页查询收货地址信息失败");
    }

    /**
     * 根据ID获取收货地址信息
     * @param id 收货地址ID
     * @return Response<MemberAddressDto>
     */
    @Override
    public Response<MemberAddressDto> getAddressById(Long id) {
        return Response.failed("查询收货地址信息失败");
    }

    /**
     * 分页查询范围内的店铺列表
     * @param param 查询参数
     * @return Response<Page<Map<String, Object>>>
     */
    @Override
    public Response<Page<Map<String, Object>>> storeRange(PlatStoreQueryParam param) {
        return Response.failed("查询收货地址信息失败");
    }

    @Override
    public Response<PlatStoreDTO> queryById(Long id) {
        return Response.failed("根据id查询店铺详情失败");
    }

    /**
     * 根据店铺ID获取店铺经营类目
     * @param storeId 店铺id
     * @return Response<List<Map<String,Object>>>
     */
    @Override
    public Response<List<Map<String, Object>>> getCategoriesByStoreId(Long storeId) {
        return Response.failed("根据店铺ID获取店铺经营类目");
    }

    @Override
    public Response<Page<PlatStoreDTO>> page(PlatStoreQueryParam param) {
        return Response.failed("分页查询店铺信息失败");
    }

    /**
     * 根据平台ID获取店铺列表
     * @param platId 平台ID
     * @return Response<List<PlatStoreDTO>>
     */
    @Override
    public Response<List<PlatStoreDTO>> getStoresByPlatId(Long platId) {
        return Response.failed("根据平台ID获取店铺列表失败");
    }

    /**
     * 批量更新店铺信息
     * @param storeDTOS 店铺列表
     * @return Response<List<Long>>
     */
    @Override
    public Response<List<Long>> batchUpdateStores(List<PlatStoreDTO> storeDTOS) {
        return Response.failed("批量更新店铺信息失败");
    }

    @Override
    public Response<List<PlatStore>> getPlatStoreByIds(List<Long> ids) {
        return Response.failed("根据店铺ID集合获取店铺信息失败");
    }
}
